<?php 
  include_once ('config.php');
  if(empty($_SESSION['allowed_select_model'])){
  	echo "forbbiden";
  	exit();
  }
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>模版管理</title>

<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" type="text/css" media="screen"
	href="include/elfinder/js/jquery/jquery-ui.css">
<script type="text/javascript" src="include/elfinder/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="include/elfinder/js/jquery/jquery-ui.min.js"></script>

<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" media="screen"
	href="include/elfinder/css/elfinder.min.css">
<link rel="stylesheet" type="text/css" media="screen"
	href="include/elfinder/css/theme.css">

<!-- elFinder JS (REQUIRED) -->
<script type="text/javascript" src="include/elfinder/js/elfinder.min.js"></script>

<!-- elFinder translation (OPTIONAL) -->
<script type="text/javascript" src="include/elfinder/js/i18n/elfinder.zh_CN.js"></script>

<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
			$().ready(function() {
				var elf = $('#elfinder').elfinder({
					url : 'include/elfinder/php/connector_for_select_channel.php',  // connector URL (REQUIRED)
					 getFileCallback: function(file) {
						// alert(file);
						 window.opener.$("#channel_model").val(file);
						 window.close();
						  },
				    lang: 'zh_CN',
				    height:'500',           // language (OPTIONAL)
				    uiOptions : {
	// toolbar configuration
	toolbar : [
		['back', 'forward'],
		 ['reload'],
		 ['home', 'up'],
		['mkdir', 'mkfile', 'upload'],
		['open', 'download', 'getfile'],
		['info'],
		['quicklook'],
		['copy', 'cut', 'paste'],
		['rm'],
		['duplicate', 'rename', 'edit', 'resize'],
		['extract', 'archive'],
		['search'],
		['view']
	]
}
				    }).elfinder('instance');
			});
		</script>
</head>
<body>

	<!-- Element where elFinder will be created (REQUIRED) -->
	<div id="elfinder"></div>

</body>
</html>
